package com.lesama.lambda.test;

import java.util.Random;

public class RandomHandler {
    public static void main(String[] args) {
        useRandomNumHandler(() -> new Random().nextInt(100) + 1);
    }
    public static void useRandomNumHandler(RandomNumHandler randomNumHandler) {
        System.out.println(randomNumHandler.randomNum());
    }
}

interface RandomNumHandler {
    int randomNum();
}
